'''
Created on Apr 24, 2011

@author: Yang Sun
'''

import time
class Server:
    '''
    classdocs
    '''
    def __init__(self, host, server_time, id, BWType):
        '''
        Constructor
        '''
        self.host = host
        self.server_time = time.mktime(time.strptime(server_time, '%a%b%d%H:%M:%S%Y%Z'))        
        self.local_time = time.mktime(time.gmtime(time.time()))        
        self.id = id
        self.BWType = BWType
    
    def __str__(self):
        template = \
        '''
        host = %s
        server_time = %s
        local_time = %s
        id = %s
        BWType = %s
        ''' % (self.host, self.server_time, self.local_time, self.id, self.BWType)
        
        return template
        
        